<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>面向对象-高级事件绑定</title>
    <!--<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>-->
</head>
<style>
    div{width: 400px;height: 400px;background: blue;}
</style>
<script>
//addEventListener() 按绑定顺序执行
window.onload = function(){

    var test1 = document.getElementById("test1")
    test1.addEventListener('click',function(){
        alert("this is a test ")
    },false)

    test1.addEventListener('click',function(){
        this.style.background = 'gray';
    },false)
}


</script>
<body>
    <div id="test1"></div>
</body>
</html>

